const CracoLessPlugin = require('craco-less')

module.exports = {
  babel: {
    plugins: [
      [
        '@babel/plugin-proposal-decorators',
        { legacy: true },
      ],
    ],
  },
  plugins: [
    {
      plugin: CracoLessPlugin,
      options: {
        lessLoaderOptions: {
          lessOptions: {
            modifyVars: {},
            javascriptEnabled: true,
          },
        },
      },
    },
  ],
  devServer: {
    port: 10086,
    proxy: {
      '/qq': {
        target:
          'https://view.inews.qq.com/',
        changeOrigin: true,
        pathRewrite: {
          '^/qq': '',
        },
      },
    },
  },
}
